{% extends 'sys_templates/public/base.html' %}
{% block content %}
    <fieldset class="layui-elem-field layui-field-title site-title">
        <legend><a name="default">{{ title }}</a></legend>
    </fieldset>
    <form class="layui-form" enctype="multipart/form-data">
        {% for foo in form %}
            <div class="layui-form-item">
                <label class="layui-form-label">{{ foo.label }}</label>
                <div class="layui-input-block">
                    {{ foo }}
                    {% if foo.name=='web_logo' %}
                        <span class="layui-btn layui-btn-normal" onclick="open_file()">上传图片</span>
                    {% endif %}
                {% if foo.name=='web_QrCode' %}
                <span class="layui-btn" onclick="open_qrCode()">上传图片</span>
                {% endif %}
                </div>
            </div>
        {% endfor %}
        <input type="file" id="upload" name="upload" accept="image/*" onchange="upload_file('{{ url_for('cms_bp.upload_img') }}')"
               style="display:none"/>
        <input type="file" id="upload_qrCode" name="upload" accept="image/*" onchange="upload_QrCode('{{ url_for('cms_bp.upload_img') }}')" style="display:none"/>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <a class="layui-btn" href="javascript:;" onclick="submit_post()">提交保存</a>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </form>
{% endblock %}
